package com.zjsd.sqeybusiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsd.sqeybusiness.mapper.AgencyInfoMapper;
import com.zjsd.sqeybusiness.domain.AgencyInfo;
import com.zjsd.sqeybusiness.service.IAgencyInfoService;

/**
 * 代理商信息Service业务层处理
 *
 * @author Zheng
 * @date 2020-11-05
 */
@Service
public class AgencyInfoServiceImpl implements IAgencyInfoService
{
    @Autowired
    private AgencyInfoMapper agencyInfoMapper;

    /**
     * 查询代理商信息
     *
     * @param agencyId 代理商信息ID
     * @return 代理商信息
     */
    @Override
    public AgencyInfo selectAgencyInfoById(Long agencyId)
    {
        return agencyInfoMapper.selectAgencyInfoById(agencyId);
    }

    /**
     * 查询代理商信息列表
     *
     * @param agencyInfo 代理商信息
     * @return 代理商信息
     */
    @Override
    public List<AgencyInfo> selectAgencyInfoList(AgencyInfo agencyInfo)
    {
        return agencyInfoMapper.selectAgencyInfoList(agencyInfo);
    }

    /**
     * 新增代理商信息
     *
     * @param agencyInfo 代理商信息
     * @return 结果
     */
    @Override
    public int insertAgencyInfo(AgencyInfo agencyInfo)
    {
        return agencyInfoMapper.insertAgencyInfo(agencyInfo);
    }

    /**
     * 修改代理商信息
     *
     * @param agencyInfo 代理商信息
     * @return 结果
     */
    @Override
    public int updateAgencyInfo(AgencyInfo agencyInfo)
    {
        return agencyInfoMapper.updateAgencyInfo(agencyInfo);
    }

    /**
     * 批量删除代理商信息
     *
     * @param agencyIds 需要删除的代理商信息ID
     * @return 结果
     */
    @Override
    public int deleteAgencyInfoByIds(Long[] agencyIds)
    {
        return agencyInfoMapper.deleteAgencyInfoByIds(agencyIds);
    }

    /**
     * 删除代理商信息信息
     *
     * @param agencyId 代理商信息ID
     * @return 结果
     */
    @Override
    public int deleteAgencyInfoById(Long agencyId)
    {
        return agencyInfoMapper.deleteAgencyInfoById(agencyId);
    }
}
